home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / listx / mlistsrt.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-11-12  |  2.1 KB  |  72 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "List/X+ UserControl Sample"
  4.    ClientHeight    =   3870
  5.    ClientLeft      =   2490
  6.    ClientTop       =   1830
  7.    ClientWidth     =   4515
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3870
  10.    ScaleWidth      =   4515
  11.    Begin VB.CheckBox Check1 
  12.       Caption         =   "Sort Numerically"
  13.       Height          =   255
  14.       Left            =   240
  15.       TabIndex        =   1
  16.       Top             =   3360
  17.       Value           =   1  'Checked
  18.       Width           =   2175
  19.    End
  20.    Begin Project1.MListSrt MListSrt1 
  21.       Height          =   3015
  22.       Left            =   240
  23.       TabIndex        =   0
  24.       Top             =   240
  25.       Width           =   2175
  26.       _ExtentX        =   3836
  27.       _ExtentY        =   5318
  28.    End
  29.    Begin VB.Label Label1 
  30.       Caption         =   "This sample shows how easy it is to extend List/X+'s functionality by using it in a VB5 control."
  31.       BeginProperty Font 
  32.          Name            =   "MS Sans Serif"
  33.          Size            =   9.75
  34.          Charset         =   0
  35.          Weight          =   400
  36.          Underline       =   0   'False
  37.          Italic          =   0   'False
  38.          Strikethrough   =   0   'False
  39.       EndProperty
  40.       Height          =   3015
  41.       Left            =   2520
  42.       TabIndex        =   2
  43.       Top             =   240
  44.       Width           =   1815
  45.    End
  46. Attribute VB_Name = "Form1"
  47. Attribute VB_GlobalNameSpace = False
  48. Attribute VB_Creatable = False
  49. Attribute VB_PredeclaredId = True
  50. Attribute VB_Exposed = False
  51. Option Explicit
  52. Private Sub Check1_Click()
  53.    If (Check1.Value <> 1) Then
  54.       MListSrt1.NumericSort = False
  55.    Else
  56.       MListSrt1.NumericSort = True
  57.    End If
  58. End Sub
  59. Private Sub Form_Load()
  60.    Dim list As MList
  61.    Dim i As Integer
  62.    Me.Left = (Screen.Width - Me.ScaleWidth) / 2
  63.    Me.Top = (Screen.Height - Me.ScaleHeight) * 2 / 5
  64.    Set list = MListSrt1.ListCtl
  65.    For i = 0 To 99
  66.       list.AddItem i
  67.    Next
  68.    MListSrt1.NumericSort = True
  69.    list.SortOrder = "a"
  70.    list.Sorted = True
  71. End Sub
  72.